home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
noweb
/
src
/
c
/
strsave.nw
< prev
Wrap
Text File
|
1995-02-24
|
409b
|
18 lines
% Copyright 1991 by Norman Ramsey. All rights reserved.
% See file COPYRIGHT for more information.
<<header>>=
char *strsave (char *s); /* returns a pointer to a fresh copy of s */
<<*>>=
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "strsave.h"
#include "errors.h"
char *strsave (char *s) {
char *t = malloc (strlen(s)+1);
checkptr(t);
strcpy(t,s);
return t;
}